#ifndef RANDOM_H_

#define RANDOM_H_


#define A 16807L  /* multiplier (7**5) for 'ranf' */
#define M 2147483647L      /* modulus (2**31-1) for 'ranf' */


class Random{
	public:
		Random() : seed(124){}

		bool init();
		//Random Number Generator
		double ranf(void);
		int uniform(int,int);
		double uniform(double,double);
		double expntl(double);
		double triangular(double,double,double);
		double normal(double,double);
		double powelaw(double,double,double);
		void setSeed(long =0);
		long getSeed() const { return seed; }
		long seed;
	private:
		//parameters for RNG
		double exp_int_x;
		double exp_dur_x;
		double tri_bs_a,tri_bs_b,tri_bs_c;
		//double norm_bs_x,norm_bs_s;
		double norm_spd_x,norm_spd_s;
};
extern Random rng;

#endif /* RANDOM_H_ */
